//
//  JMHAFNetTool.h
//  MusicGift
//
//  Created by kingbw on 16/3/7.
//  Copyright © 2016年 kingbw. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^ BlockOfSuccess)(id result);

typedef NS_ENUM(NSUInteger, JMHResponseStyle) {
    JMHJSON,
    JMHXML,
    JMHDATA,
};

typedef NS_ENUM(NSUInteger, JMHRequestStyle) {
    JMHRequestJSON,
    JMHRequestString,
    
};
@interface JMHAFNetTool : NSObject

+ (void)GETNetWithUrl:(NSString *)url
                 body:(id)body
           headerFile:(NSDictionary *)header
             response:(JMHResponseStyle)responseStyle
              success:(BlockOfSuccess)success
              failure:(void (^)(NSError * error))failure;

+ (void)POSTNetWithUrl:(NSString *)url
                  body:(id)body
             bodyStyle:(JMHRequestStyle)bodyRequestStyle
           headerFile:(NSDictionary *)header
             response:(JMHResponseStyle)responseStyle
              success:(BlockOfSuccess)success
              failure:(void (^)(NSError * error))failure;


@end
